package com.huang.slideswitch;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;

import com.huang.slideswitch.SlideSwitchView.SlideSwitch;


public class MainActivity extends AppCompatActivity {

    private SlideSwitch ss;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        ss = (SlideSwitch) findViewById(R.id.ss);
        ss.setOnStateListener(new SlideSwitch.OnStateListener() {
            @Override
            public void onClose() {
                Log.e("tag", "onClose: " );
            }

            @Override
            public void onOpen() {
                Log.e("tag", "onOpen: " );
            }
        });
    }
}
